﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;

namespace DreamBuilder.UI.UserControls.DataAccess.Services
{
    public abstract class RefListDAL : UserControlsDataAccessBase
    {
        abstract public string RefListDBHelperString { get; set; }        
        abstract public DataTable SelectListPaged(string select, string from, string where, string orderBy, string ascOrDesc, int intPageIndex, int intPageSize, out int recordCount);
        public DataTable GetExportData(string selectSql, string fromSql, string whereSql, string orderSql)
        {
            string sSql = " select " + selectSql + " from " + fromSql + " where 1 = 1 " + whereSql + " order by " + orderSql;
            return DBHelper.ExecuteDataSet(sSql).Tables[0].Copy();
        }
    }
}
